﻿<%@ Page Title="" Language="C#" MasterPageFile="~/cms/cms.master" AutoEventWireup="true" CodeFile="AddNewGallery.aspx.cs" Inherits="cms_AddNewGallery" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 285px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentMain" Runat="Server">
<h1 class="top-heading">Gallery Info</h1>
<table cellpadding="5" width="400">
    <tr>
        <td>Name:</td>
        <td class="style1">
        <asp:RequiredFieldValidator ID="RequiredName" runat="server" 
                        ControlToValidate="txtName" ErrorMessage="*" ForeColor="Red" 
                        SetFocusOnError="True" Display="Dynamic"></asp:RequiredFieldValidator>
            <asp:TextBox ID="txtName" runat="server" CssClass="textbox"></asp:TextBox></td>
    </tr>
    <tr>
        <td valign="top">Image:</td>
        <td class="style1">
            <asp:FileUpload ID="FileImage" runat="server" />
            <asp:Image ID="image" runat="server" Height="100px" Width="100px" />
        </td>
    </tr>
    <tr>
        <td valign="top">Description:</td>
        <td class="style1">
        <asp:RequiredFieldValidator ID="RequiredDescription" runat="server" 
                        ControlToValidate="txtDescription" ErrorMessage="*" ForeColor="Red" 
                        SetFocusOnError="True" Display="Dynamic"></asp:RequiredFieldValidator>
            <asp:TextBox ID="txtDescription" runat="server" CssClass="textbox" 
                Height="198px" TextMode="MultiLine"></asp:TextBox></td>
    </tr>
    <tr>
        <td>Type:</td>
        <td class="style1">
            <asp:DropDownList ID="ddlType" runat="server" CssClass="textbox" 
                DataSourceID="SqlGetAllType" DataTextField="TypeName" DataValueField="TypeId">
            </asp:DropDownList>
            <asp:SqlDataSource ID="SqlGetAllType" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                SelectCommand="GetAllType" SelectCommandType="StoredProcedure">
            </asp:SqlDataSource>
        </td>
    </tr>
    <tr>
        <td align="right"><asp:Button ID="btnAdd" runat="server" Text="Add" 
                onclick="btnAdd_Click" /></td>
        <td class="style1"><asp:Button ID="btnCancel" runat="server" Text="Cancel" 
                CausesValidation="False" PostBackUrl="~/cms/ListGallery.aspx" /></td>
    </tr>
</table>
</asp:Content>

